<?php
    
    require("./include.php");
	
	if(!$_SESSION[user_id]){
		?>
		<script>
			alert("로그인 하셔야 합니다");
			location.replace("board_login.php");
		</script>
		<?
	}
	
	if($_POST[m_pass] == ""){
		?>
		<script>
			alert("비밀번호를 입력하세요");
			history.back();
		</script>
		<?
		exit;
	}
	
	if($_POST[m_pass] != $_POST[m_pass2]){
		?>
		<script>
			alert("비밀번호를 확인하세요");
			history.back();
		</script>
		<?
		exit;
	}
	
	$sql = "update tb_member set m_pass = '".$_POST[m_pass]."' where m_id = '".$_SESSION[user_id]."'";
	sql_querry($sql);
	
?>
	<script>
		alert("회원정보가 수정 되었습니다.");
		location.replace("board_list.php");
	</script>
